﻿using System.Collections.Generic;
using System.Threading.Tasks;

namespace Infrastructure.ExternalService.Core.User
{
    /// <summary>
    /// 基础数据外部服务
    /// </summary>
    public interface IUserExternal : IExternalService
    {
        /// <summary>
        /// 查询用户的角色
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<IEnumerable<UserRoleInfo>> GetUserRolesAsync(GetUserRolesRequest request);

        /// <summary>
        /// 查询所有的角色
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<IEnumerable<UserRoleInfo>> GetAllRolesAsync(GetUserRolesRequest request);

        Task<UserInfo> GetUserAsync(GetUserRequest request);

        /// <summary>
        /// 通过手机号获取用户ID列表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<UserProfiles> GetUserIdsAsync(GetUserIdsRequest request);

        /// <summary>
        /// 根据优路号集合，获取用户ID集合：接口只返回了用户ID和优路号
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<IEnumerable<UserInfo>> GetUserIdsByYouluNosAsync(GetUserIdsByYouluNoRequest request);

        /// <summary>
        /// 根据userid集合，获取用户信息集合
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<IEnumerable<UserInfo>> GetUserInfosByUserIds(GetUserInfosByUserIdsRequest request);

        /// <summary>
        /// 根据手机号集合，获取用户信息（若要获取姓名，需设置moreInfo=Y）
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<IEnumerable<UserInfo>> GetUserInfosByMobilesAsync(GetUserInfosByMobilesRequest request);
        
        /// <summary>
        /// 批量获取员工信息
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<List<EmployeeInfo>> GetEmployeeListAsync(GetEmployeeListRequest request);


        /// <summary>
        /// 根据UserId/YouluNumber获取曾用收据号，基础数据响应数据
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<IEnumerable<UserOldMobileInfo>> GetOldMobileByUserIds(GetOldMobileByUserIdsRequest request);

        /// <summary>
        /// 根据曾用手机号，获取用户UserId
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<List<string>> GetUserIdByOldMobile(GetUserIdByOldMobileRequest request);
    }
}